package com.ruoyi.project.system.exam.domain;

import com.ruoyi.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * PK对战对象 dj_pk_battle
 * 
 * @author ruoyi
 * @date 2023-07-16
 */
public class PkBattle extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 对战ID */
    private Long id;

    /** 对战编号 */
    private String battleNo;

    /** 发起者ID（关联 sys_user.id） */
    private Long initiatorId;

    /** 应战者ID（关联 sys_user.id） */
    private Long challengerId;

    /** 答题场次配置ID（dj_exam_session_config.id） */
    private Long configId;

    /** 对战状态（1等待应战，2对战中，3已结束） */
    private Integer battleStatus;

    /** 获胜者ID（关联 sys_user.id） */
    private Long winnerId;

    /** 开始时间 */
    private Date startTime;

    /** 结束时间 */
    private Date endTime;

    /** 删除标志（0正常 1删除） */
    private String delFlag;
    
    /** 我的对战标识（initiator-我发起的，challenger-我参与的） */
    private String myBattle;

    /** 发起者是否已完成答题（0未完成，1已完成） */
    private Integer initiatorAnswered;

    /** 挑战者是否已完成答题（0未完成，1已完成） */
    private Integer challengerAnswered;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setBattleNo(String battleNo) 
    {
        this.battleNo = battleNo;
    }

    public String getBattleNo() 
    {
        return battleNo;
    }
    public void setInitiatorId(Long initiatorId) 
    {
        this.initiatorId = initiatorId;
    }

    public Long getInitiatorId() 
    {
        return initiatorId;
    }
    public void setChallengerId(Long challengerId) 
    {
        this.challengerId = challengerId;
    }

    public Long getChallengerId() 
    {
        return challengerId;
    }
    public void setConfigId(Long configId) 
    {
        this.configId = configId;
    }

    public Long getConfigId() 
    {
        return configId;
    }
    public void setBattleStatus(Integer battleStatus) 
    {
        this.battleStatus = battleStatus;
    }

    public Integer getBattleStatus() 
    {
        return battleStatus;
    }
    public void setWinnerId(Long winnerId) 
    {
        this.winnerId = winnerId;
    }

    public Long getWinnerId() 
    {
        return winnerId;
    }
    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }
    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }
    
    public String getMyBattle() 
    {
        return myBattle;
    }
    
    public void setMyBattle(String myBattle) 
    {
        this.myBattle = myBattle;
    }

    public Integer getInitiatorAnswered() 
    {
        return initiatorAnswered;
    }

    public void setInitiatorAnswered(Integer initiatorAnswered) 
    {
        this.initiatorAnswered = initiatorAnswered;
    }

    public Integer getChallengerAnswered() 
    {
        return challengerAnswered;
    }

    public void setChallengerAnswered(Integer challengerAnswered) 
    {
        this.challengerAnswered = challengerAnswered;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("battleNo", getBattleNo())
            .append("initiatorId", getInitiatorId())
            .append("challengerId", getChallengerId())
            .append("configId", getConfigId())
            .append("battleStatus", getBattleStatus())
            .append("winnerId", getWinnerId())
            .append("initiatorAnswered", getInitiatorAnswered())
            .append("challengerAnswered", getChallengerAnswered())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("delFlag", getDelFlag())
            .toString();
    }
}